package jmcnet.libcommun.communs
{
	import flexunit.framework.TestCase;
	import flexunit.framework.TestSuite;
	
	import jmcnet.libcommun.communs.helpers.HelperString;
	
	import mx.controls.DateField;
	
	import spark.components.DropDownList;
	import spark.components.TextInput;

	public class HelperStringTest extends TestCase
	{
		public function HelperStringTest(methodName:String=null)
		{
			super(methodName);
		}
		
		public static function suite():TestSuite {
   			var ts:TestSuite = new TestSuite();
   			
   			ts.addTest( new HelperStringTest( "testHelperStringIsContenuDans" ) );
   			return ts;
   		}
   		
   		public function testHelperStringIsContenuDans():void {
			var tabChaine:Array = ["ch1", "ch2", null ];
			assertTrue(HelperString.isContenuDans("ch1",tabChaine));
			assertTrue(HelperString.isContenuDans("ch2",tabChaine));
			assertTrue(HelperString.isContenuDans(null,tabChaine));
			
			assertFalse(HelperString.isContenuDans("",tabChaine));
			assertFalse(HelperString.isContenuDans("ch3",tabChaine));
			assertFalse(HelperString.isContenuDans("ch1",null));
			assertFalse(HelperString.isContenuDans(null,null));
			
   		}
		
	}
}